package com.rock.code.common.comm;

import org.quartz.CronExpression;

import java.text.ParseException;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class CronExpressionEx extends CronExpression
{
  public static final Integer ALL_SPEC = new Integer(99);
  public static final int NO_SPEC_INT = 98;
  public static final String ALL_EXE = "*";
  public static final String PER_EXE = "/";
  private String secondsExp;
  private String minutesExp;
  private String hoursExp;
  private String daysOfMonthExp;
  private String monthsExp;
  private String daysOfWeekExp;

  public CronExpressionEx(String paramString)
    throws ParseException
  {
    super(paramString);
    StringTokenizer localStringTokenizer = new StringTokenizer(paramString, " \t", false);
    this.secondsExp = localStringTokenizer.nextToken().trim();
    this.minutesExp = localStringTokenizer.nextToken().trim();
    this.hoursExp = localStringTokenizer.nextToken().trim();
    this.daysOfMonthExp = localStringTokenizer.nextToken().trim();
    this.monthsExp = localStringTokenizer.nextToken().trim();
    this.daysOfWeekExp = localStringTokenizer.nextToken().trim();
  }

  public String getCronFromSet()
  {
    return getSecondsField() + " " + getMinutesField() + " " + getHoursField() + " " + getDaysOfMonthField() + " " + getMonthsField() + " " + getDaysOfWeekField();
  }

  public String getCronFromST()
  {
    return this.secondsExp + " " + this.minutesExp + " " + this.hoursExp + " " + this.daysOfMonthExp + " " + this.monthsExp + " " + this.daysOfWeekExp;
  }

  public String getCronExpression()
  {
    return null;
  }

  public Set getSecondsSet()
  {
    return this.seconds;
  }

  public void setSecondsSet(TreeSet paramTreeSet)
  {
    this.seconds = paramTreeSet;
  }

  public String getSecondsField()
  {
    return getExpressionSetSummary(this.seconds);
  }

  public Set getMinutesSet()
  {
    return this.minutes;
  }

  public void setMinutesSet(TreeSet paramTreeSet)
  {
    this.minutes = paramTreeSet;
  }

  public String getMinutesField()
  {
    return getExpressionSetSummary(this.minutes);
  }

  public Set getHoursSet()
  {
    return this.hours;
  }

  public void setHoursSet(TreeSet paramTreeSet)
  {
    this.hours = paramTreeSet;
  }

  public String getHoursField()
  {
    return getExpressionSetSummary(this.hours);
  }

  public String format(String paramString)
  {
    if (paramString.contains(String.valueOf(98)))
      return "?";
    if (paramString.contains(String.valueOf(ALL_SPEC)))
      return "*";
    return paramString;
  }

  public Set getDaysOfMonthSet()
  {
    return this.daysOfMonth;
  }

  public void setDaysOfMonthSet(TreeSet paramTreeSet)
  {
    this.daysOfMonth = paramTreeSet;
  }

  public String getDaysOfMonthField()
  {
    return getExpressionSetSummary(this.daysOfMonth);
  }

  public Set getMonthsSet()
  {
    return this.months;
  }

  public void setMonthsSet(TreeSet paramTreeSet)
  {
    this.months = paramTreeSet;
  }

  public String getMonthsField()
  {
    return getExpressionSetSummary(this.months);
  }

  public Set getDaysOfWeekSet()
  {
    return this.daysOfWeek;
  }

  public void setDaysOfWeekSet(TreeSet paramTreeSet)
  {
    this.daysOfWeek = paramTreeSet;
  }

  public String getDaysOfWeekField()
  {
    return getExpressionSetSummary(this.daysOfWeek);
  }

  public String getSecondsExp()
  {
    return this.secondsExp;
  }

  public String getMinutesExp()
  {
    return this.minutesExp;
  }

  public String getHoursExp()
  {
    return this.hoursExp;
  }

  public String getDaysOfMonthExp()
  {
    return this.daysOfMonthExp;
  }

  public String getMonthsExp()
  {
    return this.monthsExp;
  }

  public String getDaysOfWeekExp()
  {
    return this.daysOfWeekExp;
  }

  public void setSecondsExp(String paramString)
  {
    this.secondsExp = paramString;
  }

  public void setMinutesExp(String paramString)
  {
    this.minutesExp = paramString;
  }

  public void setHoursExp(String paramString)
  {
    this.hoursExp = paramString;
  }

  public void setDaysOfMonthExp(String paramString)
  {
    this.daysOfMonthExp = paramString;
  }

  public void setMonthsExp(String paramString)
  {
    this.monthsExp = paramString;
  }

  public void setDaysOfWeekExp(String paramString)
  {
    this.daysOfWeekExp = paramString;
  }
}

/* Location:           C:\Users\think\Desktop\新建文件夹 (2)\bomc-web.jar
 * Qualified Name:     com.sitech.ibnms.util.CronExpressionEx
 * JD-Core Version:    0.5.3
 */